package com.erp.framework.util.excelupload;

import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;

public class ExcelUploadTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		ExcelUploadBuilder build = new ExcelUploadBuilder();
		try {
			String dbUrl = "jdbc:oracle:thin:@192.168.2.150:1521:merchant";
			String dbUser = "nt_uat_0421";
			String dbPasswd = "nt_uat_0421";
			String drivers = "oracle.jdbc.driver.OracleDriver";
			String path = "C:\\Documents and Settings\\Lam.Luo\\Desktop\\Book1.xls";
			if (drivers != null) {
				System.setProperty("jdbc.drivers", drivers);
			}
			Connection conn = DriverManager.getConnection(dbUrl, dbUser, dbPasswd);
			
			FileInputStream instream = new FileInputStream(path);
            
			build.UploadExcel("MS", instream, conn);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
